﻿
using System ;
using System.Windows.Forms ;

using MskEdit.Dxf.Model ;


namespace MskEdit.Dxf.Frontend
{

    public class DxfTableTreeNode : TreeNode 
    {
        private DxfTable dxfTable_ ;
        
        
        public static DxfTableTreeNode TryFrom( DxfTable dxfTable, DxfTableTreeNode fallbackValue ) {
        
            if ( dxfTable == null )
                return fallbackValue ;
                
            return new DxfTableTreeNode( dxfTable ) ;
        }
        
        
        public DxfTableTreeNode( DxfTable dxfTable ) {
        
            dxfTable_ = dxfTable ;
            this.Text = dxfTable.TableName ;
        }
    }
}
